
<template>
  <div>
    <sc-workflow
      class="workflow"
      v-model="d.nodeConfig" />
  </div>

</template>
<script>
import scWorkflow from '@/views/bpm/scWorkflow'
export default {
  name: "Design",
  components: {
    scWorkflow
  },
  data(){
    return {
      d:{
        id: 1,
        name: '请假审批',
      nodeConfig: {
      nodeName: '发起人',
        type: 0,
        nodeRoleList: [],
        childNode: {
        nodeName: '条件路由',
          type: 4,
          conditionNodes: [
          {
            nodeName: '长期',
            type: 3,
            priorityLevel: 1,
            conditionMode: 1,
            conditionList: [
              [
                {
                  label: '请假天数',
                  field: 'day',
                  operator: '>',
                  value: '7'
                }
              ]
            ],
            childNode: {
              nodeName: '领导审批',
              type: 1,
              setType: 1,
              nodeUserList: [
                {
                  id: '360000197302144442',
                  name: '何敏'
                }
              ],
              nodeRoleList: [],
              examineLevel: 1,
              directorLevel: 1,
              selectMode: 1,
              termAuto: false,
              term: 0,
              termMode: 1,
              examineMode: 1,
              directorMode: 0
            }
          },
          {
            nodeName: '短期',
            type: 3,
            priorityLevel: 2,
            conditionMode: 1,
            conditionList: [],
            childNode: {
              nodeName: '直接主管审批',
              type: 1,
              setType: 2,
              nodeUserList: [],
              nodeRoleList: [],
              examineLevel: 1,
              directorLevel: 1,
              selectMode: 1,
              termAuto: false,
              term: 0,
              termMode: 1,
              examineMode: 1,
              directorMode: 0
            }
          }
        ],
          childNode: {
          nodeName: '抄送人',
            type: 2,
            userSelectFlag: true,
            nodeUserList: [
            {
              id: '220000200908305857',
              name: '何秀英'
            }
          ]
        }
      }
    }
  }

    }
   },

}
</script>

<style scoped lang="scss">

:root {
  --el-drawer-padding-primary: 0;
}

body {
  margin: 0;
  background-color: #efefef;
}

.affix-container {
  display: flex;
  justify-content: center;
  flex-direction: row-reverse;
}

.editor {
  width: 500px;
  height: calc(100vh - 36px);
}

.editor .jsoneditor-poweredBy,
.editor .jsoneditor-transform,
.editor .jsoneditor-repair,
.editor .full-screen {
  display: none !important;
}

.workflow {
  padding: 10px;
}

.jsoneditor-menu > button.jsoneditor-copy {
  background-position: -48px 0px;
}

.el-drawer__body {
  padding: 0 !important;
}

.btn-container {
  display: flex;
  height: 42px;
  margin-left: 16px;
}

.slider {
  margin-left: 16px;
  width: 300px;
  display: flex;
}
</style>
